package se.sll.itintegration.catalogue.offer.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 *
 * @author Jiri Uosukainen
 * @author khaleddaham
 */
@SuppressWarnings("PMD.UnusedPrivateField")
@Entity
@Data
@Table(name="productreference")
@EqualsAndHashCode(exclude = {"offer"})
@ToString(exclude = {"offer"})
public class ProductReferenceEntity {
    
    @Id
    @GeneratedValue
    @Getter(AccessLevel.NONE)
    @Setter(AccessLevel.NONE)
    private Long id;
    
    @NotNull
    private String name;

    @NotNull
    private Boolean contractedProduct;
    
    private String comment;
    
    private String contractedPrice;
    
    @ManyToOne
    @JoinColumn(name = "offer")
    private OfferEntity offer;
}
